package com.esisa.IHM;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JTable;

import com.esisa.beans.ListeSCORM;


public class ListerDocument extends JFrame {
	
	public ListerDocument() {
		super();
		setTitle("Tous les etudiants");
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		
		ListeSCORM liste = new ListeSCORM();
		liste.load("resources\\doc.txt");
		System.out.println("ici");
		
		String[] entetes = {"Nom","Prenom","Chemin","Age","Absence","Presence","Retard","Remarque"};
		JTable tableau=new JTable(liste.getMatriceDoc(),entetes);
		getContentPane().add(tableau.getTableHeader(),BorderLayout.NORTH);
		getContentPane().add(tableau,BorderLayout.CENTER);
		
		pack();
		this.setVisible(true);
	}
	
	public static void main(String[] args) {
		new ListerDocument().setVisible(true);

	}

}
